* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* 使内容垂直居中 */
}

.rg_layout {
    width: 100%;
    max-width: 100%; /* 最大宽度 */
    background-color: white;
    border-radius: 10px; /* 圆角 */
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* 添加阴影 */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px; /* 内边距 */
}

.rg_left {
    text-align: center;
    margin-bottom: 20px;
}

.rg_left > p:first-child {
    color: #f96332;
    font-size: 24px;
}

.rg_left > p:last-child {
    color: #A6A6A6;
    font-size: 20px;
}

.rg_center {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.form-container {
    width: 100%;
    transition: transform 0.5s ease-in-out;
    padding: 20px;
    box-sizing: border-box;
}

#register-form {
    transform: translateX(0);
}

#login-form {
    transform: translateX(100%);
    position: absolute;
    top: 0;
    left: 0;
}

table {
    width: 100%;
    max-width: 500px; /* 限制表单最大宽度 */
    margin: 0 auto; /* 居中 */
}

.td_left {
    width: 30%;
    text-align: right;
    padding-right: 10px;
    height: 45px;
}

.td_right {
    width: 70%;
}


#captcha, #image_captcha {
    width: 50%;
    height: 33px;
    border-radius: 15px;
    border: 1px solid #e9ecef; /* 初始边框颜色 */
    padding: 10px;
    outline: none; /* 移除默认的聚焦轮廓 */
    transition: border-color 0.3s ease; /* 添加过渡效果 */
}

#captcha:focus {
    border-color: #f96332; /* 聚焦时边框颜色变为橙色 */
}

#image_captcha:focus {
    border-color: #f96332; /* 聚焦时边框颜色变为橙色 */
}


#captcha-image:hover {
    transform: scale(1.05); /* 鼠标悬停时放大 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 添加阴影 */
}

#captcha-btn {
    position: relative;
    border: none;
    outline: none;
    /*min-width: 30px; !* 设置最小宽度 *!*/
    /*padding: 10px; !* 增加内边距 *!*/
    /*font-size: 14px; !* 设置字体大小 *!*/
    color: blue; /* 设置文本颜色 */
    background-color: #e9ecef; /* 设置背景颜色 */
}

#btn_sub, #btn_login {
    width: 100%;
    max-width: 150px;
    height: 40px;
    background-color: #f96332;
    border: 1px solid #f96332;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    color: white; /* 添加白色字体 */
}

.toggle-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.toggle-buttons button {
    padding: 10px 20px;
    background-color: #f96332;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    color: white; /* 添加白色字体 */
}

/* 响应式设计 */
@media (max-width: 600px) {
    .rg_layout {
        padding: 10px;
    }

    .rg_left > p:first-child {
        font-size: 20px;
    }

    .rg_left > p:last-child {
        font-size: 16px;
    }

    .td_left {
        width: 100%;
        text-align: left;
        padding-right: 0;
    }

    .td_right {
        width: 100%;
    }

    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="qpassword"] {
        font-size: 14px;
    }


    .toggle-buttons {
        flex-direction: column; /* 按钮垂直排列 */
        gap: 5px;
    }

    .toggle-buttons button {
        width: 100%;
    }
}


/* 移动端适配 */
@media (max-width: 768px) {
    .rg_layout {
        width: 100%;
        padding: 10px;
    }

    .form-container table {
        width: 100%;
    }

    .form-container td {
        display: block;
        width: 100% !important;
        padding: 5px 0;
    }

    .form-container input[type="text"],
    .form-container input[type="password"],
    .form-container input[type="email"] {
        width: 100%;
        box-sizing: border-box;
    }

    .td_left, .td_right {
        width: 100% !important;
        text-align: left;
    }

    #captcha-btn {
        margin-top: 5px;
        width: 100%;
    }

    #captcha-image {
        margin-top: 5px;
        max-width: 100%;
    }
}


/* 仅针对手机端调整输入框宽度 */
@media (max-width: 768px) {
    /* 注册表单输入框 */
    #register-form input[type="text"],
    #register-form input[type="password"],
    #register-form input[type="email"] {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* 登录表单输入框 */
    #login-form input[type="email"],
    #login-form input[type="password"],
    #login-form input[type="text"] {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* 验证码输入框 */
    #captcha, #image_captcha {
        width: 60% !important;
    }

    /* 发送验证码按钮 */
    #captcha-btn {
        width: 35% !important;
        margin-left: 5%;
    }

    /* 验证码图片 */
    #captcha-image {
        max-width: 100%;
        height: auto;
    }

    /* 提交按钮 */
    #btn_sub, #btn_login {
        width: 100% !important;
        padding: 10px;
    }
}